/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* 游戏主容器 */
.game-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 游戏标题 */
.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4, #a18cd1, #fbc2eb);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 15s ease infinite;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 游戏信息区域 */
.game-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

/* 分数板 */
.score-board {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-label {
    font-size: 0.9rem;
    color: #b0c4de;
    margin-bottom: 5px;
    font-weight: bold;
}

.score-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* 游戏控制按钮 */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 画布容器 */
.canvas-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-canvas {
    background: rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.1);
    max-width: 100%;
    height: auto;
}

/* 游戏消息和说明 */
.game-messages {
    margin-top: 20px;
}

.status-message {
    font-size: 1.1rem;
    font-weight: bold;
    color: #00ff00;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-instructions {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-instructions h3 {
    margin-bottom: 15px;
    color: #ff9a9e;
    text-align: center;
}

.game-instructions ul {
    list-style: none;
    line-height: 1.6;
}

.game-instructions li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

.game-instructions li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #00ff00;
}

/* 移动设备控制按钮 */
.mobile-controls {
    display: none;
    margin-top: 20px;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.arrow-btn {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arrow-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.arrow-btn:active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .score-board {
        gap: 20px;
    }
    
    .score-item {
        min-width: 80px;
        padding: 10px 15px;
    }
    
    .score-value {
        font-size: 1.2rem;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .mobile-controls {
        display: block;
    }
    
    .arrow-btn {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .score-board {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .score-item {
        width: 100%;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .arrow-btn {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
}

/* 特殊动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1s ease-in-out infinite;
}

/* 闪烁效果 */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.blink {
    animation: blink 1s ease-in-out infinite;
}